<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>立即下载</title>
    <style>
        html {
            max-width: 720px;
            /*background: rgba(255,168,0,1);*/
        }

        body {
            margin: 0;
        }

        .sweep {
            width: 100%;
            height: 100%;
            max-width: 720px;
            position: absolute;
            left: 0;
            right: 0;
            margin: auto;
            background-image: url("/static/image/inviteNewImg/background.png");
            background-repeat: no-repeat;
            background-size: 100% 100%;
        }

        .sweep .title {
            position: absolute;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 0.33rem;
            font-family: FZZDHJW--GB1-0;
            font-weight: 600;
            color: rgba(255, 255, 255, 1);
            padding-top: 0.35rem;
        }

        .sweep .title2 {
            display: block;
            position: absolute;
            left: 0;
            right: 0;
            width: 2rem;
            line-height: 0.3rem;
            margin: 0 auto;
            font-size: 0.25rem;
            font-family: FZZDHJW--GB1-0;
            font-weight: 600;
            color: rgba(255, 255, 255, 1);
            padding-top: 0.2rem;
        }

        .sweep .money {
            width: 100%;
            position: absolute;
            top: 0.36rem;
        }

        .sweep .qr {
            width: 1.3rem;
            height: 1.3rem;
            margin: 0 auto;
            margin-top: 2.6rem;
            background: rgba(255, 255, 255, 1);
            box-shadow: 0px 11px 31px 0px rgba(241, 3, 3, 0.5);
            border-radius: 23px;
        }

        .share {
            width: 2.3rem;
            height: 0.7rem;
            font-size: 0.2rem;
            font-family: PingFangSC-Medium;
            font-weight: 500;
            color: rgba(255, 255, 255, 1);
            padding-bottom: 0.07rem;
            display: inherit;
            margin: 0 auto;
            margin-top: 3.2rem;
            border: 0;
            background-color: transparent;
            background-image: url("/static/image/inviteNewImg/download.png");
            background-size: 100% 100%;
        }

        .user {
            font-size: 0.1rem;
            font-family: PingFangSC-Medium;
            font-weight: 500;
            color: rgba(255, 193, 0, 1);
            position: absolute;
            left: 0;
            right: 0;
            text-align: center;
            top: 3.15rem;
        }
    </style>
    <link rel="stylesheet" href="${ctx}/css/reset.css">
    <#--<script src="${ctx}/js/wxImg.js"></script>-->
</head>
<body>
<div class="sweep">
    <h2 class="title">${title!'恭喜领取成功!'}</h2>
    <img class="money" src="/static/image/inviteNewImg/money.png">
    <p class="user"><span>${phone!''}</span><span style="padding-left: 0.08rem" onclick="relogin()">注销</span></p>
    <button class="share" onclick="download();">立即下载</button>
    <iframe MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no src='/invite/rule' height='400px'
            width="100%"></iframe>
</div>
<#--<div id="weixinMsg" class="weixin">-->
<#--<img src="/image/inviteNewImg/tip.png">-->
<#--<a href="javascript:;">-->
<#--</a>-->
<#--</div>-->
</body>
<script>
    let inviteCode = "${inviteCode!''}";

    function download() {
        window.open("https://a.app.qq.com/simple.jsp?pkgname=cc.gara.fish.jj_fish");
    }

    function relogin() {
        window.location.href = "/invite/check?inviteCode=" + inviteCode;
    }

    (function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                docEl.style.fontSize = 100 * (clientWidth / 320) + 'px';
                docEl.style.background = 'rgba(255,168,0,1)';
            };
        // Abort if browser does not support addEventListener
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
</script>
</html>
